import request from '@/utils/request'

// 查询DEMO用户信息列表
export function listUs(query) {
  return request({
    // url: '/demo/us/list',
    url: '/kamenxian/demo/us/list',
    method: 'get',
    params: query
  })
}

// 查询DEMO用户信息详细
export function getUs(id) {
  return request({
    url: '/kamenxian/demo/us/' + id,
    method: 'get'
  })
}

// 新增DEMO用户信息
export function addUs(data) {
  return request({
    url: '/kamenxian/demo/us',
    method: 'post',
    data: data
  })
}

// 修改DEMO用户信息
export function updateUs(data) {
  return request({
    url: '/kamenxian/demo/us',
    method: 'put',
    data: data
  })
}

// 删除DEMO用户信息
export function delUs(id) {
  return request({
    url: '/kamenxian/demo/us/' + id,
    method: 'delete'
  })
}

  export function exportWord(param) {
    return request({
      url: '/kamenxian/demo/us/word',
      method: 'POST',
      data: param,
      responseType: 'blob'
    });
    return response;
  }
  export function exportpdf(param) {
    return request({
      url: '/kamenxian/demo/us/pdf',
      method: 'POST',
      data: param,
      responseType: 'blob'
    });
  }
  export function exportexcel(param) {
    return request({
      url: '/kamenxian/demo/us/export',
      method: 'POST',
      data: param,
      responseType: 'blob'
    });
  }

  export function upfile(data) {
    return request({
      url: '/kamenxian/demo/us/import',
      method: 'post',
      data: data,
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      timeout: 0 // 设置超时时间为 0 表示不限制请求时间
    })
}
